//
//  HR_Touch_CustomController.m
//  Pods
//
//  Created by duanhuifen on 2017/7/24.
//
//

#import "HR_Touch_CustomController.h"
#import "HR_Touch_CustomCell.h"

@interface HR_Touch_CustomController ()<
UITableViewDelegate,
UITableViewDataSource
>
@property (strong, nonatomic) UITableView *myTableView;
@property (nonatomic,assign) NSInteger actionIndex;

@end

@implementation HR_Touch_CustomController

- (void)viewDidLoad {
    [super viewDidLoad];
    UITableView *myTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    self.myTableView = myTableView;
    [self.view addSubview:myTableView];
    self.myTableView.delegate = self;
    self.myTableView.dataSource = self;
    
    //    [self.myTableView registerNib:[UINib nibWithNibName:@"HR_Touch_CustomCell" bundle:nil] forCellReuseIdentifier:CustomCellId];
    
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    HR_Touch_CustomCell * cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
    if(!cell)
    {
        cell=[[HR_Touch_CustomCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
        cell.selectionStyle=UITableViewCellSelectionStyleNone;
    }
    
    return cell;
    //    HR_Touch_CustomCell * customCell = [tableView dequeueReusableCellWithIdentifier:CustomCellId];
    //    return  customCell;
}

- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 35;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
